import {FormOptionList} from "../../../../../types/form-option.ts";
//ignore ts
export const COLUMNS: FormOptionList[] = [
    {type: 'selection', isUseTable: true},
    {type: 'index', label: '序号', width: 55, align: 'center', isUseTable: true},
    {prop: 'winSerial', label: '窗口', width: 55, align: 'center', type: 'number'},
    {prop: 'id', label: 'Id', visible: false, isUseTable: true},
    {
        prop: 'taskType', label: '任务类型', width: 100, required:true, type: 'select', opts: [
            {label: '文生图', value: "1",},
            {label: '图生图', value: "2",}
        ]
    },
    {prop: 'taskNumber', label: '任务序号', width: 100, type: 'number'},
    {prop: 'imagePath', label: '参考图路径', width: 100, type: 'input',placeholder:"如果选择的是图生图，必须填路径"},
    {prop: 'keywords', label: '提示词', width: 100, type: 'input'},
    {prop: 'coreWords', label: '核心词', width: 100, type: 'input'},
    {prop: 'descWords', label: '描述词', width: 100, type: 'input'},
    {prop: 'styleWords', label: '风格词', width: 100, type: 'input'},
    {prop: 'scale', label: '比例', width: 100, type: 'input'},
    {prop: 'exeCount', label: '执行次数', width: 100, type: 'number'},
    {prop: 'savePath', label: '图片保存路径', width: 100, type: 'input', required: true},
    {prop: 'prefix', label: '前缀', width: 100, type: 'number', required: true},
    {prop: 'imageName', label: '图片名称', width: 100, type: 'input', required: true},
    {prop: 'runStatus', label: '运行状态', width: 100, isUseTable: true},
    {prop: 'operator', label: '操作', width: 180, fixed: "right", isUseTable: true},
]

export function getEditColumns() {
    const data = [];
    for (let i = 0; i < COLUMNS.length; i++) {
        if (!COLUMNS[i].isUseTable) {
            data.push(COLUMNS[i])
        }
    }
    return data;
}